package lesson07;

public class Test02 {

    public static void say(People people){
        people.sayArea();
    }

    public static void main(String[] args) {
//        People people = new People("阿三");
//        ChinesePeople chinesePeople = new ChinesePeople("张飞");
//        JapanesePeople japanesePeople = new JapanesePeople("山本五十六");
//
//
//        people.sayArea();
//        chinesePeople.sayArea();
//        chinesePeople.play();
//        japanesePeople.sayArea();

        People people1 = new ChinesePeople("关羽");
        People people2 = new JapanesePeople("伊藤美沙");

//        System.out.println(people1 instanceof ChinesePeople);
//        System.out.println(people1 instanceof JapanesePeople);
//        JapanesePeople people3 = (JapanesePeople) people1;
//        people3.play();

        say(new ChinesePeople("小王"));
        say(new JapanesePeople("尹腾"));
        say(new KoreaPeople("思密达"));
    }
}
